package com.youzi.tunnel.client.entity;


import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;


@Data
@EqualsAndHashCode(callSuper = false)
public class Tunnel implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /* 隧道名称 */
    private String name;

    /* 源端口 */
    private Integer fromPort;
    /* 源主机 */
    private String fromHost;
    /* 源端口 */
    private String fromClient;
    /* 到端口 */
    private Integer toPort;
    /* 到客户端 */
    private String toClient;


    public Tunnel copy() {
        Tunnel tunnel = new Tunnel();
        tunnel.setId(id);
        tunnel.setName(name);
        tunnel.setFromPort(fromPort);
        tunnel.setFromHost(fromHost);
        tunnel.setFromClient(fromClient);
        tunnel.setToPort(toPort);
        tunnel.setToClient(toClient);
        return tunnel;
    }
}
